package com.nf.service;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class Test {

//    @Pointcut("execution(* Girl.play(..))")
//    public void myPointCut(){
//        System.out.println("看看谁调用我");
//        //+joinPoint.getSignature().getName()
//    }

    @Before("execution(* Girl.play(..))||execution(* Girl.eat(..))")
    public void 打扮(){
        System.out.println("我去打扮一下");
    }

    @After("execution(* Girl.play(..))||execution(* Girl.eat(..))")
    public void 卸妆(){
        System.out.println("可以卸妆");
    }

}
